<?php
defined("_ENTRY_") or die("Restricted Access!");
defined("_ADMIN_") or header("Location:login.php");	// only admin-entry

//var_dump($_POST);
$user = get_session_user();
//echo $user->getUsername();

if(true)
{
	//echo $_POST['user_email'];
	$user->set('user_email', $_POST['user_email']);
	$user->commit();
	$_SESSION['user'] = serialize($user);
	$_SESSION["message"] = "L'email dell'utente {$user->getUsername()} e' stata modificata correttamente";
	header("location: admin.php?option=change_user");
}
?>